package edu.nus.cs4243.recon.logic;

import java.util.Set;

import edu.nus.cs4243.recon.model.Feature;
import edu.nus.cs4243.recon.model.HasCoordinates2d;
import edu.nus.cs4243.recon.model.Point2d;
import edu.nus.cs4243.recon.model.SceneView;

public class MockSceneView implements SceneView {

	private final Set<Feature> features;
	final double[] points;

	public MockSceneView(Set<Feature> features, double[] points) {
		this.features = features;
		this.points = points;
	}
	
	@Override
	public HasCoordinates2d getLocationInView(Feature f) {
		FeatureWithIndex g = (FeatureWithIndex) f;
		return new Point2d(points[g.index*2], points[g.index*2+1]);
	}
	
	@Override
	public Set<Feature> getFeatures() {
		return features;
	}

	@Override
	public Set<Feature> getCommonFeatures(SceneView other) {
		return features;
	}
	
}